/*
 *  sample.c
 *  
 *
 *  Created by Yi Lin on 11-5-6.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */


/* library data structure*/
struct enum_declaration {
        int count;
        struct enum_element *e;
}


struct enum_element {
        
        int value;
        int sequence;
        char *desc;
        char *identifier;
        struct enum_declaration *declaration;
};

/* random library */
enum_element* random(struct enum_declaration *declaration){
        int pos = random_int(declaration->count);
        return &declaration->e[pos];
}


struct enum_declaration player = {4, NULL}
int player1 = 1;
int player2 = 2;

initialize_enum_player(){
        /* need deconstruct */
        player->e = malloc(sizeof(enum_element) * player->count);
        
        player->e[player1].value = 1;
        player->e[player1].sequence = 1;
        player->e[player1].desc = "test";
        player->e[player1].identifier = "player1";
        palyer->e[player1].declaration = &palyer;
}


